CC=gcc
CFLAGS=-Wall -g
LIBPATH=../../..
INCLS=-I$(LIBPATH)/include
LIBS=-L$(LIBPATH)/lib -lthe9 -lpthread

TARGETS=getaddr parse
MULTI_TARGETS=

all : $(TARGETS) $(MULTI_TARGETS)

$(TARGETS) : % : %.c
	$(CC) $(CFLAGS) $(INCLS) -o $@ $< $(LIBS)
	chmod 744 $@

$(MULTI_TARGETS) : %_multi : %.c
	$(CC) $(CFLAGS) $(INCLS) -D_MY_MULTI -o $@ $< $(LIBS)
	chmod 744 $@

clean :
	rm -f core* $(TARGETS) $(MULTI_TARGETS)
